package com.rules.admin.login;



import com.rules.admin.domain.UserInfoCollector;
import com.rules.admin.vo.RuleUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class DefaultUserInfoCollector implements UserInfoCollector {
   @Autowired
   private UserHolder<RuleUser> userHolder;

   public String getUserId() {
      return this.getCurrentLoginUser().getUserId();
   }

   public String getOfficeId() {
      return null;
   }

   public RuleUser getCurrentLoginUser() {
      return (RuleUser)this.userHolder.getUser();
   }
}
